package com.meichis.yndms.model;

import android.text.TextUtils;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import com.meichis.yndms.MCApplication;

import java.io.Serializable;

/**
 * Created by chenhaifei on 2016/8/5.
 */
@Entity
public class Picture implements Serializable {
    //GUID
    @PrimaryKey
    @NonNull
    private String Guid = "00000000-0000-0000-0000-000000000000";
    //关联类型  1.门店照片 2.考勤照片 3.门店定位照片 4.拜访照片  210.考勤记录AI识别照片  10.AI识别注册照片
    private int RelateType = 0;
    //关联类型ID
    private int RelateID = 0;
    //照片名称
    private String FillName = "";
    //本地路径
    private String FilePath = "";
    //是否上传  0 未上传 1 已上传 9 上传失败
    private int IsUpload = 0;
    //备注
    private String Remark = "";

    private String UpError = "";
    //关联拜访GUID
    private String VisitGuid = "00000000-0000-0000-0000-000000000000";
    //关联环节code
    private String ProcessCode = "";

    public String getProcessCode() {
        return ProcessCode;
    }

    public void setProcessCode(String processCode) {
        ProcessCode = processCode;
    }

    public String getGuid() {
        return Guid;
    }

    public void setGuid(String guid) {
        Guid = guid;
    }

    public int getRelateType() {
        return RelateType;
    }

    public void setRelateType(int relateType) {
        RelateType = relateType;
    }

    public int getRelateID() {
        return RelateID;
    }

    public void setRelateID(int relateID) {
        RelateID = relateID;
    }

    public String getFillName() {
        return FillName;
    }

    public void setFillName(String fillName) {
        FillName = fillName;
    }

    public String getFilePath() {
        return FilePath;
    }

    public void setFilePath(String filePath) {
        FilePath = filePath;
    }

    public int getIsUpload() {
        return IsUpload;
    }

    public void setIsUpload(int isUpload) {
        IsUpload = isUpload;
    }

    public String getRemark() {
        return Remark;
    }

    public void setRemark(String remark) {
        Remark = remark;
    }

    public String getUpError() {
        return UpError;
    }

    public void setUpError(String upError) {
        UpError = upError;
    }

    public String getVisitGuid() {
        return VisitGuid;
    }

    public void setVisitGuid(String visitGuid) {
        VisitGuid = visitGuid;
    }

    //获取照片地址
    public String getUILFilePath() {
        return TextUtils.isEmpty(FilePath) ? MCApplication.DownLoadUrl + Guid : (FilePath.contains(MCApplication.DownLoadUrl) ? FilePath : "file:///" + FilePath);
    }

}
